#ifndef CUBOID_PRIMITIVE_H
#define CUBOID_PRIMITIVE_H

#include "object.h"

class CuboidPrimitive : public Object{
    public:
        CuboidPrimitive(int = 0);
        CuboidPrimitive(const CuboidPrimitive&, int);
        CuboidPrimitive(const Vector3D &, const Vector3D &, const Material &, int = 0);
        CuboidPrimitive(const Vector3D &, const Vector3D &, const Vector3D &, const Material &, const Matrix &, const Matrix &, int = 0);
        ~CuboidPrimitive();

        void setMinMax(const Vector3D &, const Vector3D &);
        const Vector3D &getMin() const{return min;};
        const Vector3D &getMax() const{return max;};

        void translate(const Vector3D &);
        void rotate(double, const Vector3D &);
        void scale(const Vector3D &);

        double volume() const;
        double area() const;

        void draw(bool, bool = false, const Material & = Material()) const;
        std::vector<Trio> intersection(const Ray &) const;
        void getMinMax(double *, double *, unsigned int) const;

    private:
        Vector3D min, max;
};

#endif


